1. /* srfrsmul.cpp by K.Tsuru */
  2. // function ID = 814 BRADIX
  3. /*******************************
  4. SRational class
  5. operator x*n = x.num*n/x.den
  6. ********************************/
  7. #ifndef SN_H
  8. #include "sn.h"
  9. #endif
  10. SRational RsMult(const SRational& x, ulong n){
  11. if(n == 1UL) return x;
  12. if(!n) return 0.0;
  13. SRational r(x);
  14. if(n <= r.num.SlOpMaxValue()) IsMult(r.num, n, r.num);
  15. else r.num *= n;
  16. r.reduceDone = false;
  17. r.reduce(false);
  18. return r;
  19. }

srfrsmul.cpp : last modifiled at 2016/06/26 16:29:27(479 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).